$files = Get-ChildItem -Recurse -Filter "*.tex"

foreach ($f in $files)
{
    $content = Get-Content -Path $f -Encoding UTF8
    $content = $content -replace("([`u{4e00}-`u{9fff}]+)([\\\/0-9A-Za-z]+)", "`$1 `$2")
    $content = $content -replace("([\\\/0-9A-Za-z]+)([`u{4e00}-`u{9fff}]+)", "`$1 `$2")
    $content = $content -replace("([\(\[\{`"`'\<])`u{0020}*(.+?)`u{0020}*([\)\]\}`"`'\>])", "`$1`$2`$3")
    Out-File -Encoding UTF8BOM -FilePath $f.FullName -InputObject $content
}